Optimal. Leaf size=229 \[ \frac {g (b+a \cos (e+f x)) E\left (\frac {1}{2} (e+f x)|\frac {2 a}{a+b}\right ) \sqrt {g \sec (e+f x)}}{(a-b) c f \sqrt {\frac {b+a \cos (e+f x)}{a+b}} \sqrt {a+b \sec (e+f x)}}+\frac {g \sqrt {\frac {b+a \cos (e+f x)}{a+b}} F\left (\frac {1}{2} (e+f x)|\frac {2 a}{a+b}\right ) \sqrt {g \sec (e+f x)}}{c f \sqrt {a+b \sec (e+f x)}}-\frac {g (b+a \cos (e+f x)) \sqrt {g \sec (e+f x)} \sin (e+f x)}{(a-b) f (c+c \cos (e+f x)) \sqrt {a+b \sec (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.30, antiderivative size = 229, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.180, Rules used = {4060, 2847,
2831, 2742, 2740, 2734, 2732} \begin {gather*} -\frac {g \sin (e+f x) \sqrt {g \sec (e+f x)} (a \cos (e+f x)+b)}{f (a-b) (c \cos (e+f x)+c) \sqrt {a+b \sec (e+f x)}}+\frac {g \sqrt {g \sec (e+f x)} \sqrt {\frac {a \cos (e+f x)+b}{a+b}} F\left (\frac {1}{2} (e+f x)|\frac {2 a}{a+b}\right )}{c f \sqrt {a+b \sec (e+f x)}}+\frac {g \sqrt {g \sec (e+f x)} (a \cos (e+f x)+b) E\left (\frac {1}{2} (e+f x)|\frac {2 a}{a+b}\right )}{c f (a-b) \sqrt {\frac {a \cos (e+f x)+b}{a+b}} \sqrt {a+b \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2847
Rule 4060
Rubi steps
\begin {align*} \int \frac {(g \sec (e+f x))^{3/2}}{\sqrt {a+b \sec (e+f x)} (c+c \sec (e+f x))} \, dx &=\frac {\left (g \sqrt {b+a \cos (e+f x)} \sqrt {g \sec (e+f x)}\right ) \int \frac {1}{\sqrt {b+a \cos (e+f x)} (c+c \cos (e+f x))} \, dx}{\sqrt {a+b \sec (e+f x)}}\\ &=-\frac {g (b+a \cos (e+f x)) \sqrt {g \sec (e+f x)} \sin (e+f x)}{(a-b) f (c+c \cos (e+f x)) \sqrt {a+b \sec (e+f x)}}-\frac {\left (a g \sqrt {b+a \cos (e+f x)} \sqrt {g \sec (e+f x)}\right ) \int \frac {-\frac {c}{2}-\frac {1}{2} c \cos (e+f x)}{\sqrt {b+a \cos (e+f x)}} \, dx}{(a-b) c^2 \sqrt {a+b \sec (e+f x)}}\\ &=-\frac {g (b+a \cos (e+f x)) \sqrt {g \sec (e+f x)} \sin (e+f x)}{(a-b) f (c+c \cos (e+f x)) \sqrt {a+b \sec (e+f x)}}+\frac {\left (g \sqrt {b+a \cos (e+f x)} \sqrt {g \sec (e+f x)}\right ) \int \frac {1}{\sqrt {b+a \cos (e+f x)}} \, dx}{2 c \sqrt {a+b \sec (e+f x)}}+\frac {\left (g \sqrt {b+a \cos (e+f x)} \sqrt {g \sec (e+f x)}\right ) \int \sqrt {b+a \cos (e+f x)} \, dx}{2 (a-b) c \sqrt {a+b \sec (e+f x)}}\\ &=-\frac {g (b+a \cos (e+f x)) \sqrt {g \sec (e+f x)} \sin (e+f x)}{(a-b) f (c+c \cos (e+f x)) \sqrt {a+b \sec (e+f x)}}+\frac {\left (g (b+a \cos (e+f x)) \sqrt {g \sec (e+f x)}\right ) \int \sqrt {\frac {b}{a+b}+\frac {a \cos (e+f x)}{a+b}} \, dx}{2 (a-b) c \sqrt {\frac {b+a \cos (e+f x)}{a+b}} \sqrt {a+b \sec (e+f x)}}+\frac {\left (g \sqrt {\frac {b+a \cos (e+f x)}{a+b}} \sqrt {g \sec (e+f x)}\right ) \int \frac {1}{\sqrt {\frac {b}{a+b}+\frac {a \cos (e+f x)}{a+b}}} \, dx}{2 c \sqrt {a+b \sec (e+f x)}}\\ &=\frac {g (b+a \cos (e+f x)) E\left (\frac {1}{2} (e+f x)|\frac {2 a}{a+b}\right ) \sqrt {g \sec (e+f x)}}{(a-b) c f \sqrt {\frac {b+a \cos (e+f x)}{a+b}} \sqrt {a+b \sec (e+f x)}}+\frac {g \sqrt {\frac {b+a \cos (e+f x)}{a+b}} F\left (\frac {1}{2} (e+f x)|\frac {2 a}{a+b}\right ) \sqrt {g \sec (e+f x)}}{c f \sqrt {a+b \sec (e+f x)}}-\frac {g (b+a \cos (e+f x)) \sqrt {g \sec (e+f x)} \sin (e+f x)}{(a-b) f (c+c \cos (e+f x)) \sqrt {a+b \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 4 in
optimal.
time = 8.31, size = 1019, normalized size = 4.45 \begin {gather*} \frac {\cos ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) (b+a \cos (e+f x)) (g \sec (e+f x))^{3/2} \left (\frac {2 \csc (e)}{(-a+b) f}+\frac {2 \sec \left (\frac {e}{2}\right ) \sec \left (\frac {e}{2}+\frac {f x}{2}\right ) \sin \left (\frac {f x}{2}\right )}{(-a+b) f}\right )}{\sqrt {a+b \sec (e+f x)} (c+c \sec (e+f x))}+\frac {F_1\left (\frac {1}{2};\frac {1}{2},\frac {1}{2};\frac {3}{2};\frac {\csc (e) \left (b-a \sqrt {1+\cot ^2(e)} \sin (e) \sin (f x-\text {ArcTan}(\cot (e)))\right )}{a \sqrt {1+\cot ^2(e)} \left (1+\frac {b \csc (e)}{a \sqrt {1+\cot ^2(e)}}\right )},\frac {\csc (e) \left (b-a \sqrt {1+\cot ^2(e)} \sin (e) \sin (f x-\text {ArcTan}(\cot (e)))\right )}{a \sqrt {1+\cot ^2(e)} \left (-1+\frac {b \csc (e)}{a \sqrt {1+\cot ^2(e)}}\right )}\right ) \cos ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \sqrt {b+a \cos (e+f x)} \csc \left (\frac {e}{2}\right ) \sec \left (\frac {e}{2}\right ) (g \sec (e+f x))^{3/2} \sec (f x-\text {ArcTan}(\cot (e))) \sqrt {\frac {a \sqrt {1+\cot ^2(e)}-a \sqrt {1+\cot ^2(e)} \sin (f x-\text {ArcTan}(\cot (e)))}{a \sqrt {1+\cot ^2(e)}-b \csc (e)}} \sqrt {\frac {a \sqrt {1+\cot ^2(e)}+a \sqrt {1+\cot ^2(e)} \sin (f x-\text {ArcTan}(\cot (e)))}{a \sqrt {1+\cot ^2(e)}+b \csc (e)}} \sqrt {b-a \sqrt {1+\cot ^2(e)} \sin (e) \sin (f x-\text {ArcTan}(\cot (e)))}}{(-a+b) f \sqrt {1+\cot ^2(e)} \sqrt {a+b \sec (e+f x)} (c+c \sec (e+f x))}+\frac {a \cos ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \sqrt {b+a \cos (e+f x)} \csc \left (\frac {e}{2}\right ) \sec \left (\frac {e}{2}\right ) (g \sec (e+f x))^{3/2} \left (\frac {F_1\left (-\frac {1}{2};-\frac {1}{2},-\frac {1}{2};\frac {1}{2};-\frac {\sec (e) \left (b+a \cos (e) \cos (f x+\text {ArcTan}(\tan (e))) \sqrt {1+\tan ^2(e)}\right )}{a \sqrt {1+\tan ^2(e)} \left (1-\frac {b \sec (e)}{a \sqrt {1+\tan ^2(e)}}\right )},-\frac {\sec (e) \left (b+a \cos (e) \cos (f x+\text {ArcTan}(\tan (e))) \sqrt {1+\tan ^2(e)}\right )}{a \sqrt {1+\tan ^2(e)} \left (-1-\frac {b \sec (e)}{a \sqrt {1+\tan ^2(e)}}\right )}\right ) \sin (f x+\text {ArcTan}(\tan (e))) \tan (e)}{\sqrt {1+\tan ^2(e)} \sqrt {\frac {a \sqrt {1+\tan ^2(e)}-a \cos (f x+\text {ArcTan}(\tan (e))) \sqrt {1+\tan ^2(e)}}{b \sec (e)+a \sqrt {1+\tan ^2(e)}}} \sqrt {\frac {a \sqrt {1+\tan ^2(e)}+a \cos (f x+\text {ArcTan}(\tan (e))) \sqrt {1+\tan ^2(e)}}{-b \sec (e)+a \sqrt {1+\tan ^2(e)}}} \sqrt {b+a \cos (e) \cos (f x+\text {ArcTan}(\tan (e))) \sqrt {1+\tan ^2(e)}}}-\frac {\frac {\sin (f x+\text {ArcTan}(\tan (e))) \tan (e)}{\sqrt {1+\tan ^2(e)}}+\frac {2 a \cos (e) \left (b+a \cos (e) \cos (f x+\text {ArcTan}(\tan (e))) \sqrt {1+\tan ^2(e)}\right )}{a^2 \cos ^2(e)+a^2 \sin ^2(e)}}{\sqrt {b+a \cos (e) \cos (f x+\text {ArcTan}(\tan (e))) \sqrt {1+\tan ^2(e)}}}\right )}{2 (-a+b) f \sqrt {a+b \sec (e+f x)} (c+c \sec (e+f x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 6.82, size = 238, normalized size = 1.04
method | result | size |
default | \(-\frac {i \left (2 a \EllipticF \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, \sqrt {-\frac {a -b}{a +b}}\right )-a \EllipticE \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, \sqrt {-\frac {a -b}{a +b}}\right )-b \EllipticE \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, \sqrt {-\frac {a -b}{a +b}}\right )\right ) \sqrt {\frac {a \cos \left (f x +e \right )+b}{\left (\cos \left (f x +e \right )+1\right ) \left (a +b \right )}}\, \sqrt {\frac {a \cos \left (f x +e \right )+b}{\cos \left (f x +e \right )}}\, \left (-1+\cos \left (f x +e \right )\right ) \left (\frac {g}{\cos \left (f x +e \right )}\right )^{\frac {3}{2}} \left (\cos ^{2}\left (f x +e \right )\right )}{c f \left (a \cos \left (f x +e \right )+b \right ) \left (\frac {1}{\cos \left (f x +e \right )+1}\right )^{\frac {3}{2}} \sin \left (f x +e \right )^{2} \left (a -b \right )}\) | \(238\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.02, size = 535, normalized size = 2.34 \begin {gather*} -\frac {6 \, a g \sqrt {\frac {a \cos \left (f x + e\right ) + b}{\cos \left (f x + e\right )}} \sqrt {\frac {g}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + \sqrt {2} {\left (i \, {\left (3 \, a - 2 \, b\right )} g \cos \left (f x + e\right ) + i \, {\left (3 \, a - 2 \, b\right )} g\right )} \sqrt {a g} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (f x + e\right ) + 3 i \, a \sin \left (f x + e\right ) + 2 \, b}{3 \, a}\right ) + \sqrt {2} {\left (-i \, {\left (3 \, a - 2 \, b\right )} g \cos \left (f x + e\right ) - i \, {\left (3 \, a - 2 \, b\right )} g\right )} \sqrt {a g} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (f x + e\right ) - 3 i \, a \sin \left (f x + e\right ) + 2 \, b}{3 \, a}\right ) - 3 \, \sqrt {2} {\left (i \, a g \cos \left (f x + e\right ) + i \, a g\right )} \sqrt {a g} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (f x + e\right ) + 3 i \, a \sin \left (f x + e\right ) + 2 \, b}{3 \, a}\right )\right ) - 3 \, \sqrt {2} {\left (-i \, a g \cos \left (f x + e\right ) - i \, a g\right )} \sqrt {a g} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (f x + e\right ) - 3 i \, a \sin \left (f x + e\right ) + 2 \, b}{3 \, a}\right )\right )}{6 \, {\left ({\left (a^{2} - a b\right )} c f \cos \left (f x + e\right ) + {\left (a^{2} - a b\right )} c f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\left (g \sec {\left (e + f x \right )}\right )^{\frac {3}{2}}}{\sqrt {a + b \sec {\left (e + f x \right )}} \sec {\left (e + f x \right )} + \sqrt {a + b \sec {\left (e + f x \right )}}}\, dx}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (\frac {g}{\cos \left (e+f\,x\right )}\right )}^{3/2}}{\sqrt {a+\frac {b}{\cos \left (e+f\,x\right )}}\,\left (c+\frac {c}{\cos \left (e+f\,x\right )}\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________